﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using OutlookBar;
using System.Data;
using OutlookBar.Components;
using CustomControl;
using AvalonDock;
using CMISLibrary.Libraries;
using CMISLibrary;

namespace NPCUS
{
    /// <summary>
    /// Interaction logic for Menu.xaml
    /// </summary>
    public partial class UserMenu : System.Windows.Controls.UserControl
    {
        public UserMenu()
        {
            InitializeComponent();
        }
        public event OnCreateWindow_Delegate OnCreateWindow;     
       
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void NPC_BCKD_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (OnCreateWindow != null)
                {
                    //OnCreateWindow(sender, e, "CD_rptBaoCaoCapDien", "Danh m?c thu ngân viên", "/NPCUS;component/Images/window.png", "DanhMuc", "CMIS2.DanhMuc.usercontrols.DM_D_HANG");                    

                    OnCreateWindow(sender, e, "NPC_BCKD", "Báo cáo NPC ", "/NPCUS;component/Images/window.png", "BaocaoNPC", "CMIS2.BaocaoNPC.Usercontrols.NPC_BCKD");

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi khởi tạo chức năng : " + ex.Message, "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }

        private void INTOGCS_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (OnCreateWindow != null)
                {
                    //OnCreateWindow(sender, e, "CD_rptBaoCaoCapDien", "Danh m?c thu ngân viên", "/NPCUS;component/Images/window.png", "DanhMuc", "CMIS2.DanhMuc.usercontrols.DM_D_HANG");                    

                    OnCreateWindow(sender, e, "INTOGCS", "In tờ ghi chỉ số ", "/NPCUS;component/Images/window.png", "BaocaoNPC", "CMIS2.BaocaoNPC.Usercontrols.INTOGCS");

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi khởi tạo chức năng : " + ex.Message, "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }

        private void UserDangNhap_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (OnCreateWindow != null)
                {
                    //OnCreateWindow(sender, e, "CD_rptBaoCaoCapDien", "Danh m?c thu ngân viên", "/NPCUS;component/Images/window.png", "DanhMuc", "CMIS2.DanhMuc.usercontrols.DM_D_HANG");                    

                    OnCreateWindow(sender, e, "UserDangNhap", "log ", "/NPCUS;component/Images/window.png", "NPCUS", "NPCUS.UserDangNhap");

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi khởi tạo chức năng : " + ex.Message, "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }

       

        

       

       

        
    }
}
